<template>
  <view>
    <view class="hidden-title">隐患信息</view>
    <cu-cell-group>
      <cu-cell title="隐患编码：" title-width="160rpx" :description="detail.managerCode" description-align="left">
      </cu-cell>
      <cu-cell title="隐患位置：" title-width="160rpx" :description="detail.location" description-align="left">
      </cu-cell>
      <cu-cell
        title="隐患级别："
        title-width="160rpx"
        :description="detail.managerLevelLabel"
        description-align="left"
      ></cu-cell>
      <cu-cell
        v-show="detail.managerLevelLabel === '重大隐患'"
        title="重大隐患判定依据："
        title-width="160rpx"
        :description="detail.majorManagerCriteria"
        description-align="left"
      ></cu-cell>
      <cu-cell
        title="隐患类型："
        title-width="160rpx"
        :description="detail.managerTypeLabel"
        description-align="left"
      ></cu-cell>
      <cu-cell
        v-if="detail.deptName"
        title="所属部门："
        title-width="160rpx"
        :description="detail.deptName"
        description-align="left"
      ></cu-cell>
      <cu-cell
        title="隐患描述："
        title-width="160rpx"
        :description="detail.managerDesc"
        description-align="left"
      ></cu-cell>
      <cu-cell
        title="上报人："
        title-width="160rpx"
        :description="detail.reportPersonName"
        description-align="left"
      ></cu-cell>
      <cu-cell
        title="上报时间："
        title-width="160rpx"
        :description="detail.createTime"
        description-align="left"
      ></cu-cell>
      <cu-cell
        title="相关照片："
        title-width="160rpx"
        column
      >
        <image-upload state="view" :imageUrl="detail.reportPhotoUrl"></image-upload>
      </cu-cell>
    </cu-cell-group>
  </view>
</template>

<script>
import CuCellGroup from '@/components/cu-cell/cu-cell-group.vue'
import CuCell from '@/components/cu-cell/cu-cell.vue'
import ImageUpload from '@/components/image-upload/index.vue'
export default {
  name: 'HiddenDangerInfo',
  components: {
    CuCellGroup,
    CuCell,
    ImageUpload
  },
  props: {
    detail: {
      type: Object,
      default: {}
    }
  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.background-white {
  background-color: #fff;
  padding: 20rpx 30rpx 1rpx 30rpx;

  view {
    padding: 14rpx 0;

    text {
      color: #666;
      display: inline-block;
      width: 78%;
      vertical-align: top;
    }
  }

  .bor-btm {
    display: flex;
    border-bottom: 1px solid #d5d7e3;
  }

  .photo {
    display: flex;
    justify-content: space-between;

    image {
      width: 214rpx;
      height: 214rpx;
    }
  }
}

.hidden-title {
  background: #f5f5f5;
  padding: 20rpx;
  color: #999;
}

.mb-130 {
  margin-bottom: 130px;
}

.bor-top {
  border-top: 20rpx solid #f5f5f5;
}

.cell-label {
  font-size: 30rpx;
}

.cell-content {
  font-size: 28rpx;
}
.bottom {
  margin-bottom: 300rpx;
}
</style>
